#============================================================
#    Input Utils
#============================================================
# - datetime: 2022-09-19 23:08:46
#============================================================
class_name InputUtils



static func is_click_left(event: InputEvent, pressed = true) -> bool:
	if event is InputEventMouseButton:
		return event.button_index == MOUSE_BUTTON_LEFT and event.pressed == pressed
	return false


static func is_click_right(event: InputEvent, pressed = true) -> bool:
	if event is InputEventMouseButton:
		return event.button_index == MOUSE_BUTTON_RIGHT and event.pressed == pressed
	return false

static func is_click_middle(event: InputEvent) -> bool:
	if event is InputEventMouseButton:
		return event.button_index == MOUSE_BUTTON_MIDDLE and event.pressed
	return false


static func is_double_click(event: InputEvent):
	if event is InputEventMouseButton:
		return event.button_index == MOUSE_BUTTON_LEFT and event.pressed and event.double_click
	return false


